function getTimeLimit(level) {
    try {
        // No time limit before level 30
        if (level < 30) {
            return null;
        }
        
        // Start with 100 seconds at level 30
        const baseTime = 100;
        // Decrease by 10 seconds every 10 levels
        const decreaseAmount = Math.floor((level - 30) / 10) * 10;
        // Minimum time limit is 10 seconds
        const minimumTime = 10;
        
        const timeLimit = Math.max(
            baseTime - decreaseAmount,
            minimumTime
        );
        
        return timeLimit;
    } catch (error) {
        reportError(error);
        return 100; // Default time limit
    }
}
